x86/MSI-X: correctly track interrupt masking state
authorJan Beulich <jbeulich@suse.com>
Mon, 25 Apr 2016 12:23:07 +0000 (14:23 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 25 Apr 2016 12:23:07 +0000 (14:23 +0200)
commitbd6ad54403019f213e18791b9856e4b7b71a4d47
tree985801e499dbc3deddefb663678042e4a68b89ad
parent5fe3abb574b319a8729d70d0b12e3a5b830dd66b
x86/MSI-X: correctly track interrupt masking state

When a guest unmasks MSI-X interrupts before enabling MSI-X on the
device, so far nothing updates the {host,guest}_masked internal state;
this to date only gets done when MSI-X is already enabled. This is why
half way recent Linux works (as it enables MSI-X first), while Windows
doesn't (as it enables MSI-X only after having set up und unmasked all
vectors). Since with a successful write to the vector control field
everything is ready internally, we should also update internal tracking
state there, regardless of the device's MSI-X enabled state.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
xen/arch/x86/msi.c